package com.lanmaly.cunzheng.strategy;

public enum Calculator {
    /**
     * 运算
     */
    ADD("+") {
        @Override
        public int exec(int a, int b) {
            return a + b;
        }
    },

    LESS("-") {
        @Override
        public int exec(int a, int b) {
            return a - b;
        }
    };

    Calculator(String value) {
        this.value = value;
    }

    String value;

    public String getValue() {
        return value;
    }

    public abstract int exec(int a, int b);
}
